/*
   tsAPI Distribution
   tsLayer Class

   TrueSpectra Inc, 2002
   Code by: Kevin Martin
*/

function tsLayer() {
	this.DynLayer = DynLayer;
	this.DynLayer();
};
tsLayer.prototype = new DynLayer();

if (is.def) {

	tsLayer.prototype.getOuterHTML=function(inflow) {
		var s='<div id="'+this.id+'" style="';
		if (this.visible==false) s+=' visibility:hidden;';
		if (!inflow && this.x!=null) s+=' left:'+this.x+'px;';
		if (!inflow && this.y!=null) s+=' top:'+this.y+'px;'; 
		if (this.w!=null) s+=' width:'+this.w+'px;';
		if (this.h!=null) s+=' height:'+this.h+'px;';
		if (this.clip) s+=' clip:rect('+this.clip[0]+'px '+this.clip[1]+'px '+this.clip[2]+'px '+this.clip[3]+'px);';
		else if (this.w!=null && this.h!=null) s+=' clip:rect(0px '+this.w+'px '+this.h+'px 0px);';
		if (this.z!=null) s+=' z-index='+this.z+';';
		if (this.bgImage!=null)	s+=' background-image:url('+this.bgImage+');';
		if (this.bgColor!=null)	s+=' background-color:'+this.bgColor+';';
		if (is.ie55 && this.bgImage==null && this.html==null) s+=' background-image:url('+DynAPI.librarypath+'dynapi/images/common/transparent.gif);';
		if(!inflow) s+=' position:absolute;'; /* else s+=' position:relative;'; */
		s+=' overflow:hidden">';
		if (this.html!=null) s+=this.html;
		for (var i=0; i<this.children.length; i++) s+=this.children[i].getOuterHTML();
		s+='</div>';
		return s;
	};
};